<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
<h:head>
    <title><ui:insert name="title">Resource Management Tool 2014</ui:insert></title>
</h:head>
<ui:composition template="/WEB-INF/template/template2.xhtml">
    <ui:define name="content1">
        <f:event listener="#{userLoginBean.verifyUserLogged('User')}" type="preRenderView"></f:event>

        <h:form>

            <f:ajax event="">

                <div class="invertedshiftdown" id="tabContent">
                    <ul>
                        <li
                                class="#{(userPageBean.page eq 'requestResources' or userPageBean.page eq 'requestHistory')? 'current' : 'nothing'}">
                            <h:commandLink
                                    value="#{msg.BU_mainUser_menu_reqResources}"
                                    actionListener="#{userPageBean.setPage('requestResources')}">
                            </h:commandLink></li>
                        <li
                                class="#{(userPageBean.page eq 'createNotification' or userPageBean.page eq 'viewNotificationHistory')? 'current' : 'nothing'}">
                            <h:commandLink
                                    value="#{msg.BU_mainUser_menu_createNotification}">
                                <f:actionListener binding="#{notificationBean.setFeedback('')}"/>
                                <f:actionListener
                                        binding="#{userPageBean.setPage('createNotification')}"/>

                            </h:commandLink></li>
                        <li
                                class="#{(userPageBean.page eq 'editProfile')? 'current' : 'nothing'}">
                            <h:commandLink
                                value="#{msg.BU_mainUser_menu_editProfile}"
                                actionListener="#{userPageBean.setPage('editProfile')}"/></li>
                        <li
                                class="#{(userPageBean.page eq 'editStatus')? 'current' : 'nothing'}">
                            <h:commandLink
                                value="#{msg.BU_mainUser_menu_editStatus}"
                                actionListener="#{userPageBean.setPage('editStatus')}"/></li>
                        <li
                                class="#{(userPageBean.page eq 'userSchedule')? 'current' : 'nothing'}">
                            <h:commandLink
                                value="Schedule"
                                actionListener="#{userPageBean.setPage('userSchedule')}"/></li>
                    </ul>
                </div>
            </f:ajax>
        </h:form>


        <h:panelGroup id="content1" layout="block">

            <h:panelGroup rendered="#{userPageBean.page == 'createNotification'}">
                <ui:include src="/user/createNotification.xhtml"/>
            </h:panelGroup>
            <h:panelGroup rendered="#{userPageBean.page == 'editProfile'}">
                <ui:include src="/user/editProfile.xhtml"/>
            </h:panelGroup>
            <h:panelGroup
                    rendered="#{userPageBean.page == 'viewNotificationHistory'}">
                <ui:include src="/user/viewNotificationHistory.xhtml"/>
            </h:panelGroup>

            <h:panelGroup rendered="#{userPageBean.page == 'requestResources'}">
                <ui:include src="/user/requestResources.xhtml"/>
            </h:panelGroup>
            <h:panelGroup rendered="#{userPageBean.page == 'requestHistory'}">
                <ui:include src="/user/requestHistory.xhtml"/>
            </h:panelGroup>
            <h:panelGroup rendered="#{userPageBean.page == 'editStatus'}">
                <ui:include src="/user/editStatus.xhtml"/>
            </h:panelGroup>
            <h:panelGroup rendered="#{userPageBean.page == 'userSchedule'}">
                <ui:include src="/user/userSchedule.xhtml"/>
            </h:panelGroup>
        </h:panelGroup>

    </ui:define>
</ui:composition>
</html>